package org.apache.dubbo.demo.consumer.example.eg12;

import org.apache.dubbo.demo.example.eg12.DemoService;
import org.apache.dubbo.rpc.RpcContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Application {

  public static void main(String[] args) {
    ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("classpath:example/eg12/applicationContext.xml");
    DemoService demoService = (DemoService) context.getBean("demoService");
    RpcContext.getContext().setAttachment("email", "909012366@qq.com");
    String result = demoService.sayHello("xufeng");
    System.out.println("****************************** result: " + result + " ******************************");
  }

}
